package ace.controller;

import java.util.List;

import com.alibaba.fastjson.JSON;

import ace.model.Icon;
import web.annotation.Method;
import web.annotation.Type;
import web.jdbc.QuerySQL;

@Type
public class IconController {
	QuerySQL<Icon> qs = new QuerySQL<>();
	
	@Method("getIconList")
	public String getIconList(){
		List<Icon> listIcon = qs.executeSQL("select * from icon").getResultList(Icon.class);
		String jsonIcon = JSON.toJSONString(listIcon);
		return jsonIcon;
	}
}
